<template>
  <div class="form-section" v-if="formData.config.has_cache">
    <el-row :gutter="20">
      <el-col :xs="24" :sm="12" :md="12">
        <el-form-item-plus
          :label="$t('menu.dev.action.field.has_cache', '查询缓存')"
          :tooltipContent="
            $t(
              'menu.dev.action.tip.has_cache',
              '查询缓存配置：-1 禁止，0 永久 1-N 缓存时间(秒)',
            )
          "
          prop="config.cache"
        >
          <el-input v-model="formData.config.cache" />
        </el-form-item-plus>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { smartTranslate as $t, transPlaceholder as $p } from '@/lang';

defineProps({
  formData: {
    type: Object,
    required: true,
  },
});
</script>

<style lang="scss" scoped></style>
